<template>
  <div class="container">
    <div class="container-title">
      <p>招商计划</p>
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item>招商管理</el-breadcrumb-item>
        <el-breadcrumb-item>招商计划</el-breadcrumb-item>
        <el-breadcrumb-item>招商计划</el-breadcrumb-item>
      </el-breadcrumb>
    </div>

    <div class="search-box">
      <el-form ref="form" :model="searchData">
        <el-form-item
          ><el-input
            v-model="searchData.planName"
            placeholder="计划名称"
          ></el-input>
        </el-form-item>
        <div class="block">
          <el-date-picker
            v-model="searchData.date"
            type="datetimerange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          >
          </el-date-picker>
        </div>
        <el-form-item>
          <el-select
            v-model="searchData.investmentPlanState"
            filterable
            placeholder="状态"
          >
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button
            type="success"
            @click="onSearch"
            icon="el-icon-search"
            style="background-color: #0bb197"
            >查询</el-button
          ><el-button @click="onReset" icon="el-icon-refresh" class="reset"
            >重置</el-button
          >
        </el-form-item>
      </el-form>
    </div>

    <!-- 表格 -->
    <div class="data-list">
      <div class="data-list-title">
        <span>查询结果列表</span>
        <el-button
          type="success"
          style="background-color: #0bb197"
          @click="addOpen"
          >新增</el-button
        >
      </div>
      <el-table :data="tableData" stripe style="width: 100%">
        <el-table-column prop="id" label="序号" align="center">
        </el-table-column>
        <el-table-column prop="planName" label="计划名称" align="center">
        </el-table-column>
        <el-table-column prop="planYear" label="年份" align="center">
          <template slot-scope="scope">
            {{ timeTrans(scope.row.planYear, 1) }}
          </template>
        </el-table-column>
        <el-table-column prop="planMaker" label="制定人" align="center">
        </el-table-column>
        <el-table-column
          prop="planCreationTime"
          label="创建时间"
          align="center"
        >
          <template slot-scope="scope">
            {{ timeTrans(scope.row.planCreationTime, 0) }}
          </template>
        </el-table-column>
        <el-table-column prop="investmentPlanState" label="状态" align="center">
          <template slot-scope="scope">
            <span v-if="scope.row.investmentPlanState == 0">待执行</span>
            <span v-if="scope.row.investmentPlanState == 1">执行中</span>
            <span v-if="scope.row.investmentPlanState == 2">已终止</span>
            <span v-if="scope.row.investmentPlanState == 3">已完成</span>
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" width="200">
          <template slot-scope="scope">
            <el-button @click="editOpen(scope.row)" type="text" size="small"
              >编辑</el-button
            >
            <el-button @click="delOpen(scope.row)" type="text" size="small"
              >删除</el-button
            >
          </template></el-table-column
        >
      </el-table>
      <!-- 页码 -->
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-sizes="[5, 10, 15, 20]"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
        :background="true"
      >
      </el-pagination>
    </div>

    <!-- 新增弹窗 -->
    <el-dialog
      title="新增招商计划"
      :visible.sync="addDialog"
      width="43%"
      class="add"
      top="8vh"
    >
      <!-- 新增计划弹窗 -->
      <el-dialog
        width="43%"
        title="新增计划"
        :visible.sync="newPlanDialog"
        append-to-body
        class="newPlan"
      >
        <el-form :model="addChildData">
          <div class="department-type">
            <el-form-item label="执行部门">
              <el-input
                v-model="addChildData.dept"
                autocomplete="off"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
            <el-form-item label="计划类型">
              <el-input
                v-model="addChildData.planType"
                autocomplete="off"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </div>
          <div class="unit-quantity">
            <el-form-item label="单位">
              <el-input
                v-model="addChildData.unit"
                autocomplete="off"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
            <el-form-item label="数量">
              <el-input
                v-model="addChildData.amount"
                autocomplete="off"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </div>
          <div class="start-end">
            <el-form-item label="开始时间">
              <el-date-picker
                v-model="addChildData.startDate"
                type="date"
                placeholder="选择日期"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="结束时间">
              <el-date-picker
                v-model="addChildData.endDate"
                type="date"
                placeholder="选择日期"
              >
              </el-date-picker>
            </el-form-item>
          </div>
          <div class="remarks">
            <el-form-item label="备注">
              <el-input
                v-model="addChildData.remark"
                autocomplete="off"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </div>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="newPlanDialog = false" class="cancel"
            >取 消</el-button
          >
          <el-button type="primary" @click="newPlanSave" class="save"
            >保 存</el-button
          >
        </div>
      </el-dialog>

      <el-form :model="addData">
        <div class="name-year">
          <el-form-item label="计划名称">
            <el-input
              v-model="addData.planName"
              autocomplete="off"
              placeholder="请输入"
              ref="getValue"
              @blur="windowGetData"
            ></el-input>
          </el-form-item>
          <el-form-item label="计划年份">
            <el-input
              v-model="addData.planYear"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
        </div>
        <div class="maker-remarks">
          <el-form-item label="计划制定人">
            <el-input
              v-model="addData.planMaker"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
          <el-form-item label="备注">
            <el-input
              v-model="addData.remark"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
        </div>
      </el-form>
      <div class="plan-list">
        计划列表：
        <div class="new-plan-btn">
          <el-button type="primary" @click="addSave"> 新增计划</el-button>
        </div>
      </div>
      <el-table :data="addTableData" stripe>
        <el-table-column
          property="id"
          label="序号"
          align="center"
          width="60"
        ></el-table-column>
        <el-table-column property="planType" label="计划类型" align="center">
          <template slot-scope="scope">
            <span v-if="scope.row.planType == 0">意向登记</span>
            <span v-if="scope.row.planType == 1">意向协定</span>
            <span v-if="scope.row.planType == 2">合同签批</span>
            <span v-if="scope.row.planType == 3">企业入驻</span>
          </template>
        </el-table-column>
        <el-table-column property="unit" label="单位" align="center" width="60">
          <template slot-scope="scope">
            <span v-if="scope.row.unit == 0">个</span>
            <span v-if="scope.row.unit == 1">套</span>
            <span v-if="scope.row.unit == 2">件</span>
          </template></el-table-column
        ><el-table-column
          property="amount"
          label="数量"
          align="center"
          width="60"
        ></el-table-column
        ><el-table-column label="时间范围" align="center" width="200">
          <template slot-scope="scope">
            {{ timeTrans(scope.row.startDate, 1) }}-{{
              timeTrans(scope.row.endDate, 1)
            }}
          </template> </el-table-column
        ><el-table-column
          property="dept"
          label="执行部门"
          align="center"
        ></el-table-column
        ><el-table-column
          property="remark"
          label="备注"
          align="center"
        ></el-table-column
        ><el-table-column label="操作" align="center">
          <template slot-scope="scope">
            <el-button @click="childDel(scope.row)" type="text" size="small"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button @click="addDialog = false" class="cancel">取 消</el-button>
        <el-button type="primary" @click="addDialog = false" class="save"
          >保 存</el-button
        >
      </div>
    </el-dialog>

    <!-- 编辑弹窗 -->
    <el-dialog
      title="编辑招商计划"
      :visible.sync="editDialog"
      width="43%"
      class="edit"
      top="8vh"
    >
      <!-- 编辑计划弹窗 -->
      <el-dialog
        width="43%"
        title="编辑计划"
        :visible.sync="editPlanDialog"
        append-to-body
        class="editPlan"
      >
        <el-form :model="editData">
          <div class="department-type">
            <el-form-item label="执行部门">
              <el-input
                v-model="editData.executiveDepartment"
                autocomplete="off"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
            <el-form-item label="计划类型">
              <el-input
                v-model="editData.planType"
                autocomplete="off"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </div>
          <div class="unit-quantity">
            <el-form-item label="单位">
              <el-input
                v-model="editData.unit"
                autocomplete="off"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
            <el-form-item label="数量">
              <el-input
                v-model="editData.quantity"
                autocomplete="off"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </div>
          <div class="start-end">
            <el-form-item label="开始时间">
              <el-date-picker
                v-model="editData.startDate"
                type="date"
                placeholder="选择日期"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="结束时间">
              <el-date-picker
                v-model="editData.endDate"
                type="date"
                placeholder="选择日期"
              >
              </el-date-picker>
            </el-form-item>
          </div>
          <div class="remarks">
            <el-form-item label="备注">
              <el-input
                v-model="editData.remarks"
                autocomplete="off"
                placeholder="请输入"
              ></el-input>
            </el-form-item>
          </div>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="editPlanDialog = false" class="cancel"
            >取 消</el-button
          >
          <el-button type="primary" @click="editPlanDialog = false" class="save"
            >保 存</el-button
          >
        </div>
      </el-dialog>

      <el-form :model="editData">
        <div class="name-year">
          <el-form-item label="计划名称">
            <el-input
              v-model="editData.planName"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
          <el-form-item label="计划年份">
            <el-input
              v-model="editData.planYear"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
        </div>
        <div class="maker-remarks">
          <el-form-item label="计划制定人">
            <el-input
              v-model="editData.planMaker"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
          <el-form-item label="备注">
            <el-input
              v-model="editData.remarks"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
        </div>
      </el-form>
      <div class="plan-list">
        计划列表：
        <div class="new-plan-btn">
          <el-button type="primary" @click="editSave"> 编辑计划</el-button>
        </div>
      </div>
      <el-table :data="tableData" stripe>
        <el-table-column
          property="number"
          label="序号"
          align="center"
          width="60"
        ></el-table-column>
        <el-table-column
          property="planType"
          label="计划类型"
          align="center"
        ></el-table-column>
        <el-table-column
          property="unit"
          label="单位"
          align="center"
          width="60"
        ></el-table-column
        ><el-table-column
          property="quantity"
          label="数量"
          align="center"
          width="60"
        ></el-table-column
        ><el-table-column
          property="timeFrame"
          label="时间范围"
          align="center"
          width="200"
        >
          <template slot-scope="scope">
            {{ scope.row.startDate }}-{{ scope.row.endDate }}
          </template> </el-table-column
        ><el-table-column
          property="executiveDepartment"
          label="执行部门"
          align="center"
        ></el-table-column
        ><el-table-column
          property="remarks"
          label="备注"
          align="center"
        ></el-table-column
        ><el-table-column label="操作" align="center">
          <template slot-scope="scope">
            <el-button @click="editChildDel(scope.row)" type="text" size="small"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button @click="editDialog = false" class="cancel">取 消</el-button>
        <el-button type="primary" @click="editDialog = false" class="save"
          >保 存</el-button
        >
      </div>
    </el-dialog>
    <!-- 删除弹窗 -->
    <el-dialog :visible.sync="delDialog" width="21%" center class="del">
      <span>数据删除将无法恢复，请问确认删除吗？</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="delDialog = false" class="cancel">取 消</el-button>
        <el-button type="primary" @click="delSave" class="save"
          >保 存</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>

<script>
import time from '../utils/time';
export default {
  mixins: [time],
  data: function () {
    return {
      investmentPlanName: ' ',
      pageNum: 1,
      pageSize: 5,
      total: 0,
      currentPage: 1,
      options: [
        {
          value: '0',
          label: '待执行',
        },
        {
          value: '1',
          label: '执行中',
        },
        {
          value: '2',
          label: '已终止',
        },
        {
          value: '3',
          label: '已完成',
        },
      ],
      searchData: {
        planName: '',
        date: [],
        investmentPlanState: '',
      },
      tableData: [],
      addTableData: [],
      //新增弹窗
      addDialog: false,
      newPlanDialog: false,
      editDialog: false,
      editPlanDialog: false,
      delDialog: false,
      //添加父计划
      addData: {
        investmentPlanState: 0,
        planCreationTime: '',
        planMaker: '',
        planName: '',
        planYear: '',
        remark: '',
      },
      //添加子计划
      addChildData: {
        amount: 0,
        dept: '',
        endDate: '',
        investmentPlanName: '',
        planType: '0',
        remark: '',
        startDate: '',
        unit: '',
      },
      editData: {
        planName: '', //计划名称
        particularYear: '', //年份
        planMaker: '', //制定人
        creationTime: '', //创建时间
        status: 0, //状态
        planType: '', //计划类型
        unit: '', //单位
        quantity: 0, //数量
        startDate: '', //开始时间
        endDate: '', //结束时间
        executiveDepartment: '', //执行部门
        remarks: '', //备注
      },
      //父删除id
      delId: 0,
    };
  },
  methods: {
    //渲染+搜索
    getData: function () {
      this.$axios({
        url: '/smart/investment/query',
        method: 'post',
        params: {
          pageNum: this.pageNum,
          pageSize: this.pageSize,
        },
        data: {
          startTime: this.searchData.date[0],
          endTime: this.searchData.date[1],
          investmentPlanState: Number(this.searchData.investmentPlanState),
          planName: this.searchData.planName,
        },
      }).then(({ data }) => {
        if (data.code == '00000') {
          if (data.data.list.length > 0) {
            this.tableData = data.data.list;
            this.total = data.data.total;
          } else {
            this.$message.error('暂无数据！');
            this.tableData = data.data.list;
            this.pageNum = 1;
          }
        } else {
          this.$message.error(data.msg);
        }
      });
    },
    //弹窗table渲染
    windowGetData: function () {
      this.$axios({
        url: '/smart/investment/query/child/',
        method: 'post',
        data: { investmentPlanName: this.$refs.value },
      }).then(({ data }) => {
        if (data.code == '00000') {
          this.addTableData = data.data;
        } else {
          this.$message.error(data.msg);
        }
      });
    },
    //搜索
    onSearch: function () {
      this.getData();
    },
    //重置
    onReset: function () {
      this.searchData = {
        planName: '',
        date: [],
        investmentPlanState: '',
      };
      this.getData();
    },
    //新增弹窗打开
    addOpen: function () {
      this.addData = {
        planName: '',
        planYear: '',
        planCreationTime: '',
        planMaker: '',
        investmentPlanState: 0,
      };
      this.addDialog = true;
    },
    //父计划添加
    addSave: function () {
      this.newPlanDialog = true;
      this.addChildData = {
        amount: 0,
        dept: '',
        endDate: '',
        investmentPlanName: this.addData.planName,
        planType: '',
        remark: '',
        startDate: '',
        unit: '',
      };
      this.addData.planCreationTime = this.timeTrans(Date.now());
      this.$axios({
        url: '/smart/investment/add',
        method: 'post',
        data: this.addData,
      }).then(({ data }) => {
        if (data.code == '00000') {
          this.$message.success(data.msg);
        } else {
          this.$message.error(data.msg);
        }
      });
    },
    //子添加+table渲染
    newPlanSave: function () {
      this.addChildData.investmentPlanName = this.addData.planName;
      this.$axios({
        url: '/smart/investment/add/child',
        method: 'post',
        data: this.addChildData,
      }).then(({ data }) => {
        if (data.code == '00000') {
          this.newPlanDialog = false;
          this.$message.success(data.msg);
          this.windowGetData();
          this.getData();
        } else {
          this.$message.error(data.msg);
        }
      });
    },

    delOpen: function (row) {
      this.delDialog = true;
      this.delId = row.id;
    },
    delSave: function () {
      this.$axios({
        url: '/smart/investment/del/' + this.delId,
        method: 'delete',
      }).then(({ data }) => {
        if (data.code == '00000') {
          this.delDialog = false;
          this.$message.success(data.msg);
          this.getData();
        } else {
          this.$message.error(data.msg);
        }
      });
    },
    childDel: function (row) {
      this.$axios({
        url: '/smart/investment/del/child/' + row.id,
        method: 'delete',
      }).then(({ data }) => {
        if (data.code == '00000') {
          this.$message.success(data.msg);
          this.windowGetData();
        } else {
          this.$message.error(data.msg);
        }
      });
    },

    //编辑弹窗
    editOpen: function (row) {
      console.log(row);
      row.planYear = this.timeTrans(row.planYear, 0);
      row.planCreationTime = this.timeTrans(row.planCreationTime, 0);
      this.editData = row;
      this.editDialog = true;
      this.$axios({
        url: '/smart/investment/query/child',
        method: 'post',
        data: {
          investmentPlanName: this.editData.planName,
        },
      });
    },
    //父编辑保存
    editSave: function () {
      this.$axios({
        url: '/smart/investment/update',
        method: 'put',
        data: this.editData,
      }).then(({ data }) => {
        if (data.code == '00000') {
        } else {
          this.$message.error(data.msg);
        }
      });
    },
    //编辑子删除
    editChildDel: function (row) {},
    //分页
    handleSizeChange(val) {
      this.pageSize = val;
      this.getData();
    },
    handleCurrentChange(val) {
      this.pageNum = val;
      this.getData();
    },
  },
  mounted: function () {
    this.getData();
  },
};
</script>

<style lang="less" scoped>
.container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  .container-title {
    width: 98%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    p {
      color: #333333;
      font-size: 16px;
      font-weight: 400;
      font-family: 'Arial Normal', 'Arial';
    }
    .el-breadcrumb-item {
      color: rgba(148, 148, 148, 0.898039215686275);
      font-size: 12px;
      font-weight: 400;
      font-family: 'Arial Normal', 'Arial';
    }
  }
  .search-box {
    width: 98%;
    height: 80px;
    background: #ffffff;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border: 1px solid #ffffff;
    border-radius: 5px;
    .el-form {
      width: 98%;
      background: #ffffff;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      .el-form-item {
        margin-left: 10px;
        margin-bottom: 0;
        .el-select {
          width: 155px;
        }
        .el-button {
          margin: 10px;
        }
        .reset {
          background-color: white;
          color: #c0c4cc;
          border: 1px solid #c0c4cc;
        }
        .reset:hover {
          color: #0bb197;
        }
      }
      .block {
        margin-left: 10px;
      }
      .el-date-editor--datetimerange.el-input__inner {
        width: 310px;
      }
    }
  }
  .data-list {
    width: 98%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    margin-top: 20px;
    .data-list-title {
      width: 98%;
      height: 60px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      span {
        height: 16px;
        font-family: 'Arial Normal', 'Arial';
        font-weight: 700;
        font-style: normal;
        font-size: 13px;
        color: #3c4145;
      }
    }
    .el-table {
      flex: 1;
      .el-button {
        color: #0bb197;
      }
    }
    .el-pagination {
      width: 98%;
      height: 60px;
      display: flex;
      justify-content: flex-end;
      align-items: center;
    }
  }
}
</style>
<style lang="less">
.el-pagination.is-background .el-pager li:not(.disabled):hover {
  color: #0bb197;
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: #0bb197;
  color: #fff;
}
.edit .el-dialog,
.add .el-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  .el-dialog__header {
    width: 95%;
    height: 60px;
    padding: 0;
    .el-dialog__title {
      font-size: 15px;
      font-weight: bold;
      text-align: left;
      line-height: 60px;
    }
  }
  .el-dialog__body {
    width: 95%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    .el-form {
      width: 95%;
      display: flex;
      flex-direction: column;
      align-items: space-between;
      .name-year,
      .maker-remarks {
        width: 95%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .el-form-item {
          width: 48%;
        }
      }
    }
    .plan-list {
      width: 95%;
      height: 80px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: space-between;
      .new-plan-btn {
        width: 100%;
        height: 50px;
        border-top: 1px solid #0bb197;
        display: flex;
        align-items: center;
        .el-button {
          width: 66px;
          height: 30px;
          display: flex;
          justify-content: center;
          align-items: center;
          color: #ffffff;
          background: #0bb197;
        }
      }
    }
    .el-table {
      width: 95%;
      .el-button {
        color: #0bb197;
      }
    }
  }
  .el-dialog__footer {
    width: 95%;
    height: 80px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    .dialog-footer {
      width: 50%;
      display: flex;
      justify-content: space-around;
      align-items: center;
      .save {
        width: 66px;
        height: 30px;
        background: #0bb197;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .cancel {
        width: 66px;
        height: 30px;
        background: #dfe1e8;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .save:focus,
      .save:hover {
        color: #ffffff;
        border-color: #c6e2ff;
      }
      .cancel:focus,
      .cancel:hover {
        color: #333333;
        border-color: #dfe1e8;
      }
    }
  }
}
.editPlan .el-dialog,
.newPlan .el-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  .el-dialog__header {
    width: 95%;
    height: 60px;
    padding: 0;
    .el-dialog__title {
      line-height: 60px;
      font-size: 15px;
      font-weight: bold;
    }
  }
  .el-dialog__body {
    width: 95%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    .el-form {
      width: 95%;
      display: flex;
      flex-direction: column;
      align-items: center;
      .department-type,
      .unit-quantity,
      .start-end {
        width: 95%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .el-form-item {
          width: 48%;
        }
        .el-date-editor.el-input,
        .el-date-editor.el-input__inner {
          width: 100%;
        }
      }
      .remarks {
        width: 95%;
      }
    }
  }
  .el-dialog__footer {
    width: 95%;
    height: 80px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    .dialog-footer {
      width: 50%;
      display: flex;
      justify-content: space-around;
      align-items: center;
      .save {
        width: 66px;
        height: 30px;
        background: #0bb197;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .cancel {
        width: 66px;
        height: 30px;
        background: #dfe1e8;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .save:focus,
      .save:hover {
        color: #ffffff;
        border-color: #c6e2ff;
      }
      .cancel:focus,
      .cancel:hover {
        color: #333333;
        border-color: #dfe1e8;
      }
    }
  }
}
.del .el-dialog {
  .el-dialog__body {
    display: flex;
    justify-content: center;
  }
  .el-dialog__footer {
    width: 95%;
    height: 80px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    .dialog-footer {
      width: 50%;
      display: flex;
      justify-content: space-around;
      align-items: center;
      .save {
        width: 66px;
        height: 30px;
        background: #0bb197;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .cancel {
        width: 66px;
        height: 30px;
        background: #dfe1e8;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .save:focus,
      .save:hover {
        color: #ffffff;
        border-color: #c6e2ff;
      }
      .cancel:focus,
      .cancel:hover {
        color: #333333;
        border-color: #dfe1e8;
      }
    }
  }
}
</style>
